package main

import (
	_ "basic/docs"
	"basic/log"
	"basic/router"
	"basic/viper"
	"fmt"
	//	_ "github.com/swaggo/gin-swagger/example/basic/docs"
)

// @title Swagger Example API
// @version 1.0
// @description This is a sample server Petstore server.
// @termsOfService http://swagger.io/terms/

// @contact.name API Support
// @contact.url http://www.swagger.io/support
// @contact.email support@swagger.io

// @license.name Apache 2.0
// @license.url http://www.apache.org/licenses/LICENSE-2.0.html

// @host localhost:8080
// @BasePath /v2
func main() {
	log.InitLogger()
	// 读取配置文件
	viper.Viper()

	r := router.SetupRouter()

	//默认端口号是8080
	r.Run(fmt.Sprintf(":%d", viper.GVA_CONFIG.Port))
}
